/*
 *
 *  * Copyright (c) iwindplus Technologies Co., Ltd.2024-2030, All rights reserved.
 *
 *
 */

package com.iwindplus.flow.domain.enums;

import com.iwindplus.base.domain.exception.CommonException;
import lombok.Getter;

/**
 * 业务编码返回值枚举.
 *
 * @author zengdegui
 * @since 2018/12/27
 */
@Getter
public enum FlowCodeEnum implements CommonException {
    /**
     * 名称已经存在.
     */
    NAME_EXIST(90061, "name_exist", "名称已经存在"),

    /**
     * 编码已经存在.
     */
    CODE_EXIST(90062, "code_exist", "编码已经存在"),

    /**
     * 已发布流程不允许修改.
     */
    PUBLISHED_NOT_EDIT(90063, "published_not_edit", "已发布流程不允许修改"),

    /**
     * 已停用才能删除.
     */
    DISABLED_CAN_DELETE(90064, "disabled_can_delete", "已停用才能删除"),

    ;
    /**
     * 业务状态码.
     */
    private final Integer bizStatus;

    /**
     * 业务编码.
     */
    private final String bizCode;

    /**
     * 业务信息.
     */
    private final String bizMessage;

    /**
     * 构造方法.
     *
     * @param bizStatus  业务状态码
     * @param bizCode    业务编码
     * @param bizMessage 业务信息
     */
    FlowCodeEnum(final Integer bizStatus, final String bizCode, final String bizMessage) {
        this.bizStatus = bizStatus;
        this.bizCode = bizCode;
        this.bizMessage = bizMessage;
    }
}
